<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="css/Orders-all.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		$(".ddxq").click(function(){
			$.ajax({
			  	url:"OrderRecord/selectDetails",
			  	type:"POST",
			  	async:true,
			  	dataType:"text",
			  	data:"OrderRecordId="+$(this).attr("Data-Orderrecordid"),
			  	success:function(data){
			  		$("#Order").html(data);
			  	},
			  	error:function(){
			  	alert("Code error!!!");
			  	}
			  	});
		});
	});
</script>
</head>
<body>
	<div class="y-right">
		<div class="o-list">
	    	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="o-top">
	        	<tbody>
	        		<tr>
	                	<td width="34%">车票信息</td>
	                    <td width="12%">单价</td>
	                    <td width="14%">票种/票数</td>
	                    <td width="12%">应付总额</td>
	                    <td width="12%">订单状态</td>
	                    <td width="16%">操作</td>
	                </tr>
	            </tbody>
	        </table>
	        <c:forEach items="${orderRecord}" var="order">        	
		        <!--订单列表 开始-->
		        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="o-thead">
		        	<tbody>
		        		<tr>
		                	<td width="34%">订单号：<c:out value="${order.orderrecordid}"/></td><!-- 20161116100527124 -->
		                    <td colspan="2">订票时间：<c:out value="${order.ticket.ticketdata }" /></td>
		                    <td width="40%" colspan="3">订单来源：汕头汽车客运网站售票</td>
		                </tr>
		           </tbody>
		       </table>
		       <table width="100%" border="0" cellpadding="0" cellspacing="0" class="o-table">
		       		<tbody>
		       			<tr>
		                	<td>
		                    	<dl class="o-cc">
		                        	<dt>2016-11-17 06:00 <b>固定班</b></dt>
		                            	<dd class="ow-45">汕头<br><c:out value="${order.ticket.route.startStation }" /></dd>
		                                <dd class="ow-10">&nbsp;</dd>
		                                <dd class="ow-45">广东<br> <c:out value="${order.ticket.route.destStation }" /></dd>
		                                <div class="clear"></div>
		                        </dl>
		                    </td>
		                    <td width="12%">￥<c:out value="${order.ticket.route.price}" /></td>
		                    <td width="14%">全票×<c:out value="${order.ticketnum }" />张</td>
		                    <td width="12%">￥<c:out value="${order.ticket.route.price * order.ticketnum }" /></td>
		                    <td width="12%">${order.orderStatic==1?"已完成":order.orderStatic==2?"已退款":"已取消"}</td>
		                    <td width="16%"><a class="ddxq" Data-Orderrecordid="${order.orderrecordid}">订单详情</a></td>
		                </tr>
		             </tbody>
		       </table>         
	       </c:forEach>
           <!--订单列表 结束-->
           <div class="h-10"></div>
           <div class="h-10"></div>
           <div class="quotes">
	       </div>
		</div>
	 </div>
</body>
</html>